import Vue from 'vue';
import App from './App';
// 复制
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)

Vue.config.productionTip = false;

App.mpType = 'app';

// 引入全局uView
import uView from '@/uni_modules/uview-ui'
import mixin from './common/mixin'
Vue.use(uView);

// 此处为演示vuex使用，非uView的功能部分
import store from '@/store';
import Common from '@/common/common'

// #ifdef MP
// 引入uView对小程序分享的mixin封装
const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)
// #endif
Vue.mixin(mixin)

// 引入uView提供的对vuex的简写法文件
let vuexStore = require('@/store/$u.mixin.js');
Vue.mixin(vuexStore);
// 复制插件
import GoogleModal from '@/common/google-modal.js'
Vue.use(GoogleModal, {
	store
})
// console.log = () => {}
// console.info = () => {}
let mo = function(e) {
	e.preventDefault()
}

function stop() {
	document.body.style.overflow = 'hidden'
	document.addEventListener('touchmove', mo, {
		passive: false,
	})
}

function stats() {
	document.body.style.overflow = ''
	document.removeEventListener("touchmove", mo, {
		passive: false
	});
}

// 水印
// import watermark from '@/components/wm-watermark/wm-watermark'
// Vue.component('watermark',watermark)



Vue.prototype.$common = Common
Vue.prototype.$stop = stop
Vue.prototype.$stats = stats
// Vue.prototype.$store = store

const app = new Vue({
	store,
	...App
});
require('./util/request/index')(app)
app.$mount();